/**
 * 
 */
package systole.persistence.brokersInterface;

import java.util.Date;
import java.util.List;

import systole.domain.analysis.Analysis;
import systole.domain.persons.Medic;
import systole.domain.persons.Patient;
import systole.exceptions.ExceptionDAO;

/**
 * Interface to store and get Analysis objects.
 * 
 * @author jmj
 *
 */
public interface AnalysisBroker {

    /**
     * @param analisys
     * @throws ExceptionDAO
     */
    public void insert(Analysis analisys) throws ExceptionDAO;

    /**
     * @param analisys
     * @throws ExceptionDAO
     */
    public void update(Analysis analisys) throws ExceptionDAO;

    /**
     * @param id
     * @return The Analysis with id.
     * @throws ExceptionDAO
     */
    public Analysis getAnalisysById(Integer id) throws ExceptionDAO;

    /**
     * @param patient
     * @return The list of patient Analysis.
     * @throws ExceptionDAO
     */
    public List<Analysis> getAnalisysByPatien(Patient patient) throws ExceptionDAO;

    /**
     * @param medic
     * @return The list of medic Analysis.
     * @throws ExceptionDAO
     */
    public List<Analysis> getAnalisysByMedic(Medic medic) throws ExceptionDAO;

    /**
     * @param patient
     * @return The last patient Analysis.
     * @throws ExceptionDAO
     */
    public Analysis getLastPatientAnalisys(Patient patient) throws ExceptionDAO;

    /**
     * @return The list of Analysis.
     * @throws ExceptionDAO
     */
    public List<Analysis> getAllAnalisys() throws ExceptionDAO;


       /**
     * @param date
     * @param medic
     * @param patient
     * @return The list of medic Analysis.
     * @throws ExceptionDAO
     */
    public List<Analysis> getAnalysisByDateMedicaPatiente(Date date, Patient patient, Medic medic)throws ExceptionDAO;
}
